The present invention generally relates to database assist methods, and more particularly to a database assist method which carries out a process such as selecting an item of a record in a database.
Typical functions of a relational database include selection, projection, join, aggregate, grouping and sorting. In order to realize such functions, a relational database manager reads the records stored in the database into a memory of a host computer before processing the records. If all of the records stored in the database are read into the memory of the host unit and the processing is carried out one record at a time, an extremely large load is applied to a central processor and a channel processor of the host computer.
In order to prevent the extremely large load from being applied to the processors of the host computer, there is a conventional relational database processing technique which uses indexes as shown in FIG. 1. By employing this technique which uses the indexes, it becomes possible to determine specific records and to read only the specific records from the database into the memory of the host computer in order to process the specific records. As a result, the number of records which need to be read from the database into the memory of the host computer is reduced, and the load on the processors of the host computer is reduced.
Next, a description will be given of the conventional relational database processing technique which uses the indexes. In FIG. 1, indexes A, B, C, D and E are set with respect to different items. Each index points to a corresponding record of the relational database as indicated by an arrow.
The relational database is made up of a group of records in which the contents of a plurality of items are set. For example, the items include an employee number, name, position name, birth date and the like. When retrieving the item such as the employee number, for example, a reference is made to a corresponding index of this item out of the indexes A, B, C, D and E, and the corresponding record of the relational database is read. The read record is subjected to a processing such as a sorting in an ascending order, and is output thereafter.
However, according to the conventional relational database processing technique described above, the index must be set for a plurality of items and stored in the case of a work which makes various retrievals with respect to the same table. For this reason, the following problems occur.
First, there is a problem in that it takes considerable time to make the indexes for the large number of items.
Second, there is a problem in that the index must be updated if a line of the relational database is updated, and the processing time of the updating system becomes long.
Third, there is a problem in that it takes considerable time and effort to design and manage the definitions of the indexes.